package com.payment.service.impl;

import com.payment.entity.Arrange;
import com.payment.entity.ArrangeWithDoctorDto;
import com.payment.mapper.ArrangeMapper;
import com.payment.service.ArrangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class ArrangeServiceImpl implements ArrangeService {

    @Autowired
    private ArrangeMapper arrangeMapper;

    @Override
    public List<ArrangeWithDoctorDto> getAll() {
        return arrangeMapper.getAll();
    }

    @Override
    public List<ArrangeWithDoctorDto> getByKeyword(String keyword) {
        //模糊查询
        String nickName = keyword + "%";
        return arrangeMapper.getByKeyword(nickName);
    }

    @Override
    public int add(Arrange entity) {
        return arrangeMapper.add(entity);
    }

    @Override
    public int del(int id) {
        return arrangeMapper.del(id);
    }

    @Override
    public int update(Arrange entity) {

        return arrangeMapper.update(entity);
    }
}
